nop
a library for providing a javascript function that does nothing; it's like super useful
use case
Did you know every time you create a do-nothing no-op function you're consuming
memory? You can literally save maybe a whole byte or two by using this nop library.
Anybody who cares about being efficient and doesn't care about being rediculous should use this library.
examples
default callback
var nop = require('nop');
function example(options) {
options = options || {};
options.success = options.success || nop;
options.error = options.error || nop;
options.success();
}
feel like calling a function, but don't want it to do anything and don't want to create it myself
var nop = require('nop');
var a = 'a';
var b = 'b';
var c = 'c';
var d = 'd';
var e = 'e';
var f = 'f';
nop();
var g = 'g';
var h = 'h';
var j = 'j';
nop();
nop();
var i = 'i';
var j = 'j';
var k = 'ok';